﻿@model List< LeadMaster.Models.LoadingCapacity>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
    <legend>Maintain Your Loading Capacities For Further Orders</legend>
    <table>
    <tr>
    <th>Week Beginning</th>
    <th>Capacity</th>
    </tr>
    @for (int i=0;i<Model.Count();i++)
    {
    <tr class="capacityrows">
    <td>
    <input class="text-box single-line input-validation-error" data-val="true" data-val-date="The field WeekBeginning must be a date." 
        data-val-required="The WeekBeginning field is required." name="[@(i)].WeekBeginning" type="datetime" value="@(Model[i].WeekBeginning.ToShortDateString())" readonly>
    </td>
    <td>@Html.EditorFor(model => model[i].Capacity)</td>
    </tr>
    @Html.HiddenFor(m => m[i].CallCentreID)
    @Html.HiddenFor(m => m[i].LoadingCapacityID)
    }
    </table>
    <div class="spacer"></div>
    <input type="submit" value="Save Capacities" />
    </fieldset>
}


